package org.rency.ues.domain.request;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

/**
 * 批量解密请求
 *
 * @author: Created by user_rcy@163.com on 2016/8/2.
 */
public class DecryptBatchRequest extends BaseRequest{

    @NotNull(message = "密钥集不能为空")
    @Size(min = 1,message = "密钥集至少1条记录")
    private List<String> tickets;

    public List<String> getTickets() {
        return tickets;
    }

    public void setTickets(List<String> tickets) {
        this.tickets = tickets;
    }

    public void addTicket(String ticket) {
        if(this.tickets == null){
            this.tickets = new ArrayList<String>();
        }
        this.tickets.add(ticket);
    }
}